#include <iostream>
using namespace::std;
class Line
{
private:
    class Point{
    public:
        Point(int x,int y)
        : _ix(x)
        , _iy(y)
        {

        }

    friend ostream & operator << (ostream &os,const Line::Point &rhs);

    private:
        int _ix;
        int _iy;
    };
public:
    Line(int x1, int y1, int x2, int y2)
    : _pt1(x1,y1)
    , _pt2(x2,y2)
    {

    }
    friend ostream & operator << (ostream &os,const Line &rhs);
    friend ostream & operator << (ostream &os,const Line::Point &rhs);
private: 
    Point _pt1;
    Point _pt2;
    double length = 10;
};

ostream & operator << (ostream &os,const Line &rhs){
    os << rhs._pt1 << " " << rhs._pt2;
    return os;
}

ostream & operator << (ostream &os,const Line::Point &rhs){
    os << rhs._ix << " " << rhs._iy;
    return os;
}


void test(){
    //Line::Point pt1(1,2);
    //Line::Point pt2(3,4);
    Line line2(1,2,3,4);
    Line line1(1,2,3,4);
    cout << sizeof(Line)<< endl;
    cout << line1 << endl;
    cout << line2 << endl;

}

int main()
{
    test();
    return 0;
}

